package collection.stream;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Miyako
 * @Date: 2024-07-19-9:54
 * @Description: 动态数组下标越界也会报错
 */
public class ArrayListTest01 {
    public static void main(String[] args) {
        List list = new ArrayList();
        list.add(1);
        list.add(2);
        for (int i = 0; i < 4; i++) {
            System.out.println(i);
            System.out.println(list.get(i));
        }
    }

}
